<?php

App::uses('AppModel', 'Model');

/**
 * Comentario Model
 *
 */
class Comentario extends ComentariosAppModel {

    public $actsAs = array('CakePtbr.AjusteData', 'CakePtbr.AjusteFloat', 'Usuarios.AjusteUsuario', 'Search.Searchable');
    //``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``
    public $filterArgs = array(
        'id' => array('type' => 'value'),
        'email' => array('type' => 'like'),
        'titulo' => array('type' => 'like'),
        'descricao' => array('type' => 'like'),
        'plugin' => array('type' => 'like'),
        'controller' => array('type' => 'like'),
        'action' => array('type' => 'like'),
        'id_registro' => array('type' => 'value'),
        'id_comentario' => array('type' => 'value'),
        'status' => array('type' => 'value'),
        'created' => array('type' => 'like'),
        'modified' => array('type' => 'like'),
        'updated' => array('type' => 'like'),
    );

    /**
     * Validation rules
     *
     * @var array
     */
    public $validate = array(
        'email' => array(
            'email' => array(
                'rule' => array('email'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'titulo' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'descricao' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'controller' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'action' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'id_registro' => array(
            'numeric' => array(
                'rule' => array('numeric'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
        'status' => array(
            'numeric' => array(
                'rule' => array('numeric'),
            //'message' => 'Your custom message here',
            //'allowEmpty' => false,
            //'required' => false,
            //'last' => false, // Stop validation after this rule
            //'on' => 'create', // Limit validation to 'create' or 'update' operations
            ),
        ),
    );

}
